package answer

import "fmt"

func hammingDistance(x int, y int) int {
	result := 0
	xor := x ^ y
	temp := fmt.Sprintf("%b", xor)
	for _, value := range []byte(temp) {
		if value == '1' {
			result++
		}
	}
	return result
}
